package optimizers.ganeat.oscillator.robustfaststrong;

import java.util.Map;

import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTabbedPane;
import javax.swing.JTextPane;

import fitness.FastStrongOscillatorFitness;
import fitness.RobustFastStrongOscillatorFitness;

import model.OligoSystemGeneral;

import optimizers.commons.RunConfig;
import optimizers.ganeat.Constants;
import optimizers.ganeat.Individual;

public class IndividualRobustFSO extends Individual {

	public IndividualRobustFSO(Map<String, Integer> innovations,
			Map<String, String> nodeNames, int geneIndex, int indivIndex,
			RunConfig config) {
		super(innovations, nodeNames, geneIndex, indivIndex, config);
		// TODO Auto-generated constructor stub
	}

	public IndividualRobustFSO(Map<String, Integer> innovations,
			Map<String, String> nodeNames, int geneIndex, int indivIndex,
			RunConfig config, String text) {
		super(innovations, nodeNames, geneIndex, indivIndex, config, text);
		// TODO Auto-generated constructor stub
	}
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@Override
	public JPanel printModelInTextArea() {
		JPanel info = new JPanel();
		JTabbedPane tabbedPane = new JTabbedPane();
		info.add(tabbedPane);
		JTextPane txtPane = new JTextPane();
		String text = "";
		text += this.toString();
		if (this.fitnessResult != null) {
			text += "Fitness: " + this.fitnessResult.finalResult() + "\n";
		}

		text += "Mutation: " + this.mutationInfo + "\n";
		txtPane.setText(text);

		JTextPane modelString = new JTextPane();
		modelString.setText(this.modelString);
		JLabel label = new JLabel(this.fitnessResult.toString());
		tabbedPane.addTab("NEAT", txtPane);
		tabbedPane.addTab("NATH", modelString);
		tabbedPane.addTab("Tests", label);
		return info;
	}
}
